1. Field of the Invention
The present invention relates to an apparatus and method for decoding a digital image and to a provision medium. More particularly, the present invention relates to an apparatus and method arranged so that the efficiency of use of the bandwidth of a frame memory is improved and to a provision medium for storing a program for carrying out a process specific to the apparatus and method.
2. Description of the Related Art
FIG. 9 shows the configuration of an example of a conventional digital image decoder using the MPEG2 (Moving Picture Experts Group 2) system. When image data which has been encoded and compressed by the MPEG2 system is input to a first-in/first-out (FIFO) section 71 of an integrated circuit (IC) 70, the FIFO section 71 temporarily stores the image data and thereafter supplies the image data to a variable length decoding section 72.
The variable length decoding section 72 performs variable length decoding of the data supplied from the FIFO section 71, outputs motion vectors to a motion compensation prediction section 77, outputs quantization steps to a dequantization section 73, and outputs the image data decoded by variable length decoding to the dequantization section 73.
The dequantization section 73 dequantizes the image data supplied from the variable length decoding section 72 based on the quantization steps also supplied from the variable length decoding section 72, and outputs the dequantized data to an inverse discrete cosine transform (DCT) section 74. The data output from the dequantization section 73 is processed by inverse DCT processing in the inverse DCT section 74 to restore the original data. The inverse DCT section 74 rearranges this data until the arrayed state of the data becomes identical to that of data output from the motion compensation prediction section 77 to a computing device 75. The inverse DCT section 74 outputs the rearranged data to the computing device 75.
In an intra-mode (in-frame processing mode), the image data processed by the inverse DCT section 74 is directly output as decoded image data.
In a motion compensation prediction mode, the motion compensation prediction section 77 computes predicted values by using motion vectors supplied from the variable length decoding section 72 and reference images stored in a frame memory 76 externally attached to the IC 70. The computing device adds together image data (differential data) supplied from the inverse DCT section 74 and predicted values supplied from the motion compensation prediction section 77 to obtain decoded image data, and outputs this decoded image data.
However, when in the thus-arranged processor motion compensated predicted values of a macroblock (16xc3x9716 pixels) are obtained, it is necessary for the motion compensation prediction section 77 to read out 17xc3x9717 pixel image data as reference image data (not line-unit data but block-unit data) from the frame memory 76 with respect to each of the forward and backward directions, as described below. Therefore, it is necessary for the motion compensation prediction section 77 to frequently change the read address of the frame memory 76 provided outside the IC 70, so that fast reading cannot be achieved. Ordinarily, a wait time occurs at the time of changing the frame memory read address (row address), and the access time is increased due to frequent change of the read address.
Since the motion compensation prediction section 77 cannot read out reference image data during the wait time, the efficiency of use of the bandwidth is disadvantageously low.
In view of the above-described circumstances, an object of the present invention to provide a digital image decoding apparatus and method designed to improve the efficiency of use of the bandwidth of the frame memory.
To achieve this object, according to one aspect of the present invention, there is provided a digital image decoding apparatus comprising decoding means for decoding input image data, dequantization means for dequantizing image data supplied from the decoding means, transform means for transforming data supplied from the dequantization means, first storage means for storing reference image data, motion compensation prediction means for computing motion compensated predicted values by exerting motion vectors on the reference image data, computation means for computing the reference image data by adding together image data output from the transform means and predicted values output from the motion compensation prediction means, and second storage means for storing, of the reference image data stored in the first storage means, an extent of image data probable to be referred to by the motion compensation prediction means, and for supplying the stored data to the motion compensation prediction means.
According to another aspect of the present invention, there is provided a digital image decoding method comprising a decoding step of decoding input image data, a dequantization step of dequantizing image data supplied from the decoding step, a transform step of transforming data supplied from the dequantization step, a first storage step of storing reference image data, a motion compensation prediction step of computing motion compensated predicted values by exerting motion vectors on the reference image data, a computation step of computing the reference image data by adding together image data output from the transform step and predicted values output from the motion compensation prediction step, a second storage step of storing, of the reference image data stored in the first storage step, an extent of image data probable to be referred to in the motion compensation prediction step, and a transfer step of transferring the image data stored in the second storage step to compute the motion compensated predicted values.
According to still another object of the present invention, there is provided a provision medium having a program stored thereon and used to provide the program to a digital image decoding apparatus, the digital image decoding apparatus being operated in accordance with the program to execute a process including a decoding step of decoding input image data, a dequantization step of dequantizing image data supplied from the decoding step, a transform step of transforming data supplied from the dequantization step, a first storage step of storing reference image data, a motion compensation prediction step of computing motion compensated predicted values by exerting motion vectors on the reference image data, a computation step of computing the reference image data by adding together image data output from the transform step and predicted values output from the motion compensation prediction step, a second storage step of storing, of the reference image data stored in the first storage step, an extent of image data probable to be referred to in the motion compensation prediction step, and a transfer step of transferring the image data stored in the second storage step to compute the motion compensated predicted values.
In the above-described digital image decoding apparatus, the decoding means decodes input image data; the dequantization means dequantizes image data supplied from the decoding means; the transform means transforms data supplied from the dequantization means; the first storage means stores reference image data; the motion compensation prediction means computes motion compensated predicted values by exerting motion vectors on the reference image data; the computation means computes the reference image data by adding together image data output from the transform means and predicted values output from the motion compensation prediction means, and the second storage means stores, of the reference image data stored in the first storage means, an extent of image data probable to be referred to by the motion compensation prediction means, and for supplying the stored data to the motion compensation prediction means.
According to the above-described digital image decoding method and provision medium, input image data is decoded in the decoding step; image data supplied from the decoding step is dequantized in the dequantization step; data supplied from the dequantization step is transformed in the transform step; reference image data is stored in the first storage step; motion compensated predicted values are computed by exerting motion vectors on the reference image data in the motion compensation prediction step; the reference image data is computed in the computation step by adding together image data output from the transform step and predicted values output from the motion compensation prediction step; of the reference image data stored in the first storage step, an extent of image data probable to be referred to in the motion compensation prediction step is stored in the second storage step; and the image data stored in the second storage step is transferred in the transfer step to compute the motion compensated predicted values.